function err_st = createBusCreateBlock(busName,foundEntries)
    curSystem1 = gcs;
    err_st = '';
    entry = findEntry(busName, foundEntries);
    if isempty(entry)
        err_st = 'Not a valid Bus Name';
        return;
    end
    try
        add_block('built-in/SubSystem',[curSystem1,'/','create_',busName]);
        curSystem = [curSystem1,'/','create_',busName];
        % 添加Bus Creator模块
        BusCreateBlockName   = [busName,'_Bus'];
        BusCreateBlock       = add_block('simulink/Signal Routing/Bus Creator',[curSystem,'/',BusCreateBlockName]);%#ok
        BusCreateBlockHandle = get_param(BusCreateBlock,'handle');
        busInfo = entry.getValue();
        elems = busInfo.Elements;
        set(BusCreateBlockHandle, 'OutDataTypeStr',['Bus: ',busName]);
        set(BusCreateBlockHandle,'Inputs',num2str(length(elems)));
        set(BusCreateBlockHandle,'NonVirtualBus','on');
        set(BusCreateBlockHandle,'InheritFromInputs','off');
        OutBlockName   = ['Out_',busName];
        OutBlock       = add_block('simulink/Sinks/Out1',[curSystem,'/',OutBlockName]);%#ok
        OutBlockHandle = get_param(OutBlock,'handle');
        set(OutBlockHandle, 'OutDataTypeStr',['Bus: ',busName]);
        OutLine        = add_line(curSystem,[BusCreateBlockName,'/1'],[OutBlockName,'/1'],'autorouting','smart');%#ok
        for i = 1:length(elems)
            elem = elems(i);
            InBlockName = elem.Name;
            InBlock = add_block('simulink/Sources/In1',[curSystem,'/',InBlockName]);%#ok
            InLine = add_line(curSystem,[InBlockName,'/1'],[BusCreateBlockName,'/',num2str(i)],'autorouting','smart');
            InLineHandle = get_param(InLine, 'handle');
            set(InLineHandle,'Name',elem.Name);
        end
    catch ME
        err_st = ME.message;
    end
end
function entry = findEntry(busName, foundEntries)
    entry = [];
    for i = 1:length(foundEntries)
        if strcmp(foundEntries(i).Name, busName)
            entry = foundEntries(i);
            return;
        end
    end
end